<!--
 * @Description: 
 * @Author: qingyang
 * @Date: 2023-07-14 14:51:11
 * @LastEditors: qingyang
 * @LastEditTime: 2023-07-14 15:11:26
-->
<template>
  <el-tooltip :placement="placement" :content="content" :disabled="disableTooltip">
    <el-tag v-bind="$attrs" :class="{ 'c-icon-tag': iconTag }">
      <CIcon :type="icon" class="g-mr5" v-if="icon" />
      <slot></slot>
    </el-tag>
  </el-tooltip>
</template>
<script lang="ts" setup>
import { withDefaults, defineProps } from 'vue';
type IPlace =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end';
interface IProps {
  placement: IPlace;
  icon: string;
  content: string;
  disableTooltip: boolean;
  iconTag: boolean;
}
const props = withDefaults(defineProps<IProps>(), {
  icon: '',
  placement: 'top',
  content: '',
  disableTooltip: false,
  iconTag: false
});
</script>
